package com.example.mylearn.proxy.learn.once.dynamicProxy.cglibProxy;

import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

public class CallKafkaMethodInterceptor implements MethodInterceptor {




    @Override
    public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {

        System.out.println("cglib开始调用");
        Object o = proxy.invokeSuper(obj, args);
        System.out.println("cglib结束调用");
        return o;
    }
}
